package com.example.mylibrarybase.yumengmeng04.adapter;

import android.content.Context;
import android.widget.LinearLayout;

import com.example.mylibrarybase.R;
import com.example.mylibrarybase.net.netWork;
import com.example.mylibrarybase.yumengmeng04.base.BaseListViewAdapter_04;
import com.example.mylibrarybase.yumengmeng04.bean.oder_04;
import com.example.mylibrarybase.yumengmeng04.view.MyViewHolder_04;

import java.util.ArrayList;


/**
 * Created by 35876 于萌萌
 * 创建日期: 16:00 . 2016年10月08日
 * 描述:
 * <p>
 * <p>
 * 备注:
 */
public class MyListView_04_single extends BaseListViewAdapter_04<oder_04.ResultBean> {


    public MyListView_04_single(Context context, int type, ArrayList datas, CallBack mCallBack) {
        super(context, type, datas, mCallBack);
    }

    @Override
    public void convert(MyViewHolder_04 helper, oder_04.ResultBean item, int position) {
        if (item instanceof oder_04.ResultBean){

            oder_04.ResultBean item1 =  item;
            if (item1.bidding_files.size()>0){
                oder_04.ResultBean.BiddingFilesBean biddingFilesBean = item1.bidding_files.get(0);
                String file_path = biddingFilesBean.file_path;
               helper.initImage(mContext, R.id.item_order_facebook_item_sellerImg, netWork.serverURL + file_path);
            }

            helper.initText(R.id.item_order_tv_phone,item1.phone1);
            helper.initText(R.id.item_tv_Order_status,item1.status);
            LinearLayout linearLayout = helper.initLinearLayout(mContext, R.id.ll_mid);
            //linearLayout.setBackgroundColor(mContext.getResources().getColor(R.color.red));
        }else {

        }

    }
}
